package com.example.day05;

import java.util.Random;

public class ArrayDemo {
    public static void main(String[] args) {
        int[] b = generateArray(5,30);
        for (int i = 0;i<b.length;i++){
            System.out.println(b[i]);
        }
    }
    public static int[] generateArray(int len,int max){
        Random rand = new Random();
        int[] arr = new int[len];
        for (int i = 0;i<arr.length;i++){
            arr[i] = rand.nextInt(max+1);
        }
        return arr;
    }
}
